package com.itheima.reggie.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.reggie.dto.DishDto;
import com.itheima.reggie.pojo.Dish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface DishMapper extends BaseMapper<Dish> {

     DishDto getByIdWithFlavor(Long id);

    Page<DishDto> pageDishDto(@Param("page") Page<DishDto> page,
                              @Param("name") String name);

    List<DishDto> listDishDto(@Param("categoryId") Long categoryId,
                              @Param("name") String name);

    List<DishDto> getDishBysetmealId(Long setmealId);
}
